const { defineConfig } = require('@vue/cli-service')
const { VantResolver, ElementPlusResolver } = require('unplugin-vue-components/resolvers');
const ComponentsPlugin = require('unplugin-vue-components/webpack');

module.exports = defineConfig({
  configureWebpack: {
    plugins: [
      ComponentsPlugin({
        resolvers: [VantResolver(), ElementPlusResolver()],
      }),
    ],
  },
  transpileDependencies: true,
  // outputDir: "E:\\ITSM\\项目代码\\ITSM\\ITSM\\wwwroot",
  devServer: {
    port: '7297',
    proxy: {
      '/api': {
        target: 'http://localhost:7296/',
        ws: true,
        changeOrigin: true
      },
      '/ImageFile': {
        target: 'http://localhost:7296/',
        ws: true,
        changeOrigin: true
      },
    }
  },
  chainWebpack:config=>{
    config.plugin('html').tap(args=>{
      args[0].title="Ryder IT 服务管理系统";
      return args;
    })
  }
})
